package com.hmall.common.config;

import com.hmall.common.dto.Address;
import com.hmall.common.feignFilter.MyFeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "userservice",configuration = MyFeignInterceptor.class)
public interface ItemFrignUser {
    @GetMapping("/address/{id}")
    public Address findAddressById(@PathVariable("id") Long id);
    @GetMapping("/address/uid/{userId}")
    public List<Address> findAddressByUserId(@PathVariable("userId") Long userId);
}
